package Lecel_five;

public class Rabbit extends Herbivore{
    private String food;
    @Override
    void eat() {
        System.out.println("兔子是"+getKind()+": 年龄为 "+super.getAge()+" 岁的 "+super.getLegs()+" 条腿的兔子在吃"+getFood());
    }

    public Rabbit(int legs, int age, String kind, String food) {
        super(legs, age, kind);
        this.food = food;
    }

    public String getFood() {
        return food;
    }

    public void setFood(String food) {
        this.food = food;
    }
}
